<template>
  <div id="app">
    <header>
      <router-view name="header" />
    </header>
    <main>
      <!-- <keep-alive exclude="Home"> -->
      <keep-alive include="Home,Category">
        <router-view />
      </keep-alive>
    </main>
    <footer>
      <router-view name="footer" />
    </footer>
  </div>
</template>

<script>
import axios from 'axios'
export default {
  name: 'App',
  created() {
    // axios.get('https://music.163.com/store/api/product/ipbanner?type=1')
    //   .then(data => console.log('云音乐：', data))
    //   .catch(err => console.log('云音乐：', err))

    axios.get('/music/store/api/product/ipbanner?type=1')
      .then(data => console.log('云音乐：', data))
      .catch(err => console.log('云音乐：', err))

    // axios.post('/zs/api/v1/login')
    //   .then(data => console.log('login data:', data))

    // axios.post('/ls/api/v1/register')
    //   .then(data => console.log('reg data:', data))
  },
}
</script>

<style>
  @font-face {
    font-family: 'iconfont';  /* Project id 3141300 */
    src: url('https://at.alicdn.com/t/font_3141300_mpwuw7a14h.woff2?t=1642411861377') format('woff2'),
        url('https://at.alicdn.com/t/font_3141300_mpwuw7a14h.woff?t=1642411861377') format('woff'),
        url('https://at.alicdn.com/t/font_3141300_mpwuw7a14h.ttf?t=1642411861377') format('truetype');
  }

  .iconfont{
    font-family:"iconfont" !important;
    font-size:16px;
    font-style:normal;
    -webkit-font-smoothing: antialiased;
    -webkit-text-stroke-width: 0.2px;
    -moz-osx-font-smoothing: grayscale;
  }
</style>

<style lang="less">
  html, body, #app {
    height: 100%;
  }
  #app {
    display: flex;
    flex-direction: column;

    main {
      flex: 1;
      overflow-x: hidden;
    }
  }
</style>
